extension:# Rpm2cpio file. RPM | cpio-Div12. Install files with the. Deb extension:# Dpkg-I file. Deb13. decompress the file with the. Deb extension:# Dpkg-Deb-fsys-tarfile file. Deb | tar xvf-ar PFile. Deb data.tar.gz | tar xvzf-14.files with the extension of .zip:# Unzip file.zipDecompress WinZip files in LinuxIf JDK is installed, you can use the jar command a
:# Rpm2cpio file. RPM | cpio-Div12. Install files with the. Deb extension:# Dpkg-I file. Deb13. decompress the file with the. Deb extension:# Dpkg-Deb-fsys-tarfile file. Deb | tar xvf-ar PFile. Deb data.tar.gz | tar xvzf-14.files with the extension of .zip:# Unzip file.zipDecompress WinZip files in LinuxIf JDK is installed, you can use the jar command and the
and compression ratio. -num adjusts the speed of compression with the specified number num,-1 or--fast represents the fastest compression method (low compression ratio), 9 or--best represents the slowest compression method (high compression ratio). The system default value is 6. instruction Example: Gzip *% compress each file in the current directory into a. gz file. GZIP-DV *% extracts each compressed file in the current directory and lists detailed
for a matching regular expression in a compressed file, using the same as the grep command, except that the object is a compressed file. If the user wants to see if there is a certain word in a compressed file, the Zgrep command is available.Bz:Bzip2-d filename.bzBUNZIP2 filename.bzBZ2:Generate Linux-2-4-2.tar using BUNZIP2 linux-2-4-2.tar.bz2Use tar xvf Linux-2-4-2.ta
, display the filename and compression ratio. -num adjusts the speed of compression with the specified number num,-1 or--fast represents the fastest compression method (low compression ratio), 9 or--best represents the slowest compression method (high compression ratio). The system default value is 6.instruction Example:Gzip *% compress each file in the current directory into a. gz file. GZIP-DV *% extracts each compressed file in the current director
1, *.tar with TAR–XVF decompression2, *.gz with gzip-d or gunzip decompression3, *.tar.gz and *.tgz with TAR–XZF decompression4, *.bz2 with bzip2-d or with BUNZIP2 decompression5, *.tar.bz2 with TAR–XJF decompression6, *. Z Extract with Uncompress7, *.
detailed information.$ GZIP-DV * 123.gz: -50.0%--replaced with 123 aaa.gz: -50.0%--Replaced with AAA abc.gz: -50.0%--Replaced with ABC$ ls123 AAA ABCExample 3: Detailed Example 1 shows the information of each compressed file, and does not understand the pressure.$ gzip-l *Compressed uncompressed ratio uncompressed_name4 -50.0% 1234 -50.0% AAA4 -50.0% ABC About -416.7% (totals)$ ls123.gz aaa.gz abc.gzExa
directory into a. gz file.
$ cd/home
$ gzip *
$ ls
123.gz aaa.gz abc.gz
Example 2: Unzip each compressed file in Example 1 and list detailed information.
$ GZIP-DV *
123.gz: -50.0%--Replaced with 123Aaa.gz: -50.0%--Replaced with AAAAbc.gz: -50.0%--Replaced with ABC
$ ls
123 AAA ABC
Example 3: Details the information
: detailed information of each compressed file in Example 1 is displayed without decompression.
$ Gzip-L *
Compressed uncompressed ratio uncompressed_name28 4-50.0% 12328 4-50.0% aaa28 4-50.0% ABC84 12-416.7% (totals)
$ Ls
123. GZ aaa.gz abc.gz
Example 4: compress a Tartar file, for example, usr.tar. the extension name of the compressed file is .tar.gz.
$ Gzip usr.tar
$ Ls
Usr.tar.gz
---------------------------------------------
with. bz2bzip2-D all.bz2bunzip2all.bz25) for files ending with tar.bz2Tar-XJF all.Tar. bz26) for. Z End of File uncompress all. Z7For.Tar. Z End of FileTar-xzf all.Tar. Z also for common compressed files under window, zip and. Rar,linux have the appropriate methods to decompress them:1For.ZipLinux provides a zip and unzip program, ZIP is a compression program, unzip is the decompression program. They have
examples to illustrate their usage:
# Rar a all *. jpgThis command is to compress all. jpg files into a rarpackage named all.rar. this program willThe extension name is automatically appended to the package name.
# Unrar e all.rarThis command is to extract all files from all.rar.
So far, we have introduced tar, Gzip, gunzip, Bzip2, bunzip2, compress in Linux., Uncompress, zip、unzip、rar、unrar, you should ha
Parameter options. Here we will only give a brief introduction and give examples to illustrate their usage:
# Rar a all *. jpgThis command is to compress all. jpg files into a rarpackage named all.rar. this program willThe extension name is automatically appended to the package name.
# Unrar e all.rarThis command is to extract all files from all.rar.
So far, we have introduced tar, Gzip, gunzip, Bzip2, bunzip2, compress in Linux., Uncompress, zip、
how to unzip a. gz zip file
#gzip-D xxx.gz
Tar command
[Root@linux ~]# tar [-cxtzjvfppn] files and directories ....
Parameters:
-C: Create a compressed file parameter directive (the meaning of Create);
-X: Unlocks a parameter directive for a compressed file.
-T: View the files inside the tarfile.
In particular, th
program, but it seems that there are not as many people using compress as gzip and Bzip2 .. The file ending with Z is the result of Bzip2 compression. The decompress program relative to compress is uncompress. Use the-Z parameter in tar to call compress. The following is an example:
# Tar-CZF all.tar. z *. jpg
Forbidden. Z
# Tar-xzf all.tar. Z
This command is us
Tags: Ota win and 3.1 htm str RAC OSI multiple
Original: Linux unzip multiple. gz or. tar.gz files at once
Unzip multiple compressed packagesFor extracting multiple .gz files, use this command:for gz in *.gz; do gunz
Linux under the compression, decompression command a variety of, unlike in Windows next WinRAR fight all over the world without rival, exclusively. rar. zip format.For example, the commonly used tar tar.gz tar.bz2 under Linux. Z and so on. The CPU time and compression ratios of each compression and decompression method vary greatly. Here I would like to enumerate, I hope the inappropriate, please advise. --
Roughly summed up the Linux under the various formats of compression package compression, decompression methods. But some of the methods I did not use, also not all, I hope you help me to add, I will be ready to modify, thank you.
. tar
Unpack: Tar xvf Filename.tar
Packing: Tar cvf filename.tar dirname
(Note: Tar is p
path for the extracted files, such as the XZ compressed file as 1.txt.xz#xz-D 1.txt.xz-c >/tmp/1.txt4, ZipunzipZip followed by file compression after the filename and then with the file to be compressed, in the current directory compression, the original file will disappear, support compression directory but to add-rCompression: #zip 1.txt.zip 1.txtSpecify the compression path:#zip/tmp/a/1.txt.zip/tmp/1.txt compress the/tmp/1.txt to/tmp/a/under the text to 1.txt.zipCompression directory: #zip-R
:
#cpio-div File.cpio
or CPIO-DIVC File.cpio
10. Installation of file with the extension of. RPM:
#rpm-I. file.rpm
11. Extract files with the extension of. RPM:
#rpm2cpio file.rpm | Cpio-div
12. Installation of files with a. deb extension:
#dpkg-I. File.deb
13. Unzip files with a. deb extension:
#dpkg-deb-fsys-tarfile File.deb | Tar Xvf-ar P
File.deb data.tar.gz | Tar
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.